from appium import webdriver
import time
import logging

logging.basicConfig(level=logging.DEBUG)

des  = {
    "platformName": "Android",
    "appium:platformVersion": "7.1.2",
    "appium:deviceName": "emulator-5554",
    "udid": "emulator-5554",
    "appPackage": "com.android.settings",
    "appActivity": ".Settings"
}

# 实例化连接驱动对象
drver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", des)
time.sleep(5)
drver.quit()